package rladidxo.basic;

public class J05_patterns02 {
public static void main(String[] args) {
	int a, b;									//1번
	/*a=1; b=1;
	while(a<=6){								//행 row
		while(b<=a){							//열 col
			System.out.print(b+"\t");
			b++;
		}
		b=1;
		a++;
		System.out.println();
	}
	System.out.println("--------------------------------------");*/
	a=1; b=1;
	while(a<=6){								//행 row
		while(b<=6){							//열 col
			if(a>=b){System.out.print(b+"\t");}
			b++;
		}
		b=1;
		a++;
		System.out.println();
	}
	System.out.print("--------------------------------------");System.out.println("2번");//2번
	a=6; b=1;
	while(a>=1){
		while(b<=6){
			if(a>=b){System.out.print(b+"\t");}
			b++;
		}
		b=1;
		a--;
		System.out.println();
	}
	/*System.out.print("--------------------------------------");System.out.println("2번");//2번
	a=6; b=1;
	while(a>=1){
		while(b<=a){
			System.out.print(b+"\t");
			b++;
		}
		b=1;
		a--;
		System.out.println();
	}*/
	System.out.print("--------------------------------------");System.out.println("3번");//3번
	int i,j;
	i=6; j=1;
	while(j<=6){
		while(i>=1){
			if(i>j){System.out.print("\t");}
			else{System.out.print(i+"\t");}
			--i;
		}
		++j;
		i=6;
		System.out.println();
}	
/*	System.out.println("--------------------------------------");System.out.println("2번");
	i=1; j=6;
	for(;j>=1;j--){
		for(;i<=6;i++){
			if(i>j){System.out.print("\t");}
			else{System.out.print(i+"\t");}
		}i=1;System.out.println();
	}*/
	
	System.out.println("--------------------------------------");System.out.println("4번");
	for(int t=1;t<=6;t++){
	for(int o=2; o<=7;++o){
		if(o>t){
		System.out.print((o-t)+"\t");}
		else{
			System.out.print("\t");
		}
	}System.out.println();
	}
	/*System.out.println("--------------------------------------");	System.out.println("4번");
	for(int t=1;t<=6;t++){
		for(int o=1; o<=6;++o){
			if(o>=t){
				System.out.print((o-(t-1))+"\t");}
			else{
				System.out.print("\t");
			}
		}System.out.println();
	}*/
	System.out.println("--------------------------------------");	
}
}
